import { Node, Vec3 } from 'cc';
import { ecs } from 'db://app-game/libs/ecs/ECS';
import { Lineup } from '../../level-map/LevelMap.type';

/** 大本营基础组件 */
@ecs.register('HomeBaseModel')
export class HomeBaseModelComp extends ecs.Comp {
  table: TableHomeBase = new TableHomeBase();
  _id: number = -1;
  /** 地图编号 */
  get id(): number {
    return this._id;
  }
  set id(value: number) {
    this._id = value;
    this.table.init(value);
  }

  /** 预制件路径 */
  get prefabPath() {
    return this.table.prefabPath;
  }

  /** 怪兽生成点 */
  generatePoint: Vec3;
  /** 怪兽生成父节点 */
  generateParent: Node;
  /** 所属阵容 */
  lineup: Lineup;

  reset(entity: ecs.Entity): void {}
}
